import request from '@/utils/request'

// 查询设备状态统计
export function getStatus() {
  return request({
    url: '/station/pile/getStatus',
    method: 'get'
  })
}

// 查询列表
export function queryPile(query) {
  return request({
    url: '/station/pile/query',
    method: 'get',
    params: query
  })
}

// 分页查询列表
export function getList(query) {
  return request({
    url: '/station/pile/list',
    method: 'get',
    params: query
  })
}

// 查询
export function info(id) {
  return request({
    url: '/station/pile/' + id,
    method: 'get'
  })
}

// 新增充电桩
export function add(data) {
  return request({
    url: '/station/pile',
    method: 'post',
    data: data
  })
}

// 修改充电桩
export function edit(data) {
  return request({
    url: '/station/pile',
    method: 'put',
    data: data
  })
}

// 删除充电桩
export function remove(id) {
  return request({
    url: '/station/pile/' + id,
    method: 'delete'
  })
}

// 假删除充电桩
export function del(id) {
  return request({
    url: '/station/pile/del/' + id,
    method: 'put'
  })
}
